/**
,editoptions:{size:12,dataInit: function(element) {$(element).datepicker({dateFormat: 'yy-mm-dd'})}} 
,formoptions:{elmprefix:'(*)'}
, edittype:'select', editoptions:{value:{1:'One',2:'Two'}}
,editrules:{number:true}
**/

//压力计使用记录（Gauge Use Record）
$(document).ready(function(){	
	$("#list_gur").jqGrid({
		url: '/ajax/ajax_zy_gauge_use_record.php?'+url_obj, //显示的数据
		//editurl: '/ajax/ajax_zy_gauge_use_record.php?'+url_obj,
		datatype: 'json', //xml、json、local(js直接赋值)
		mtype: 'POST',
		colNames: ["序号(Item)", "井名(Well Name)", "层位(Zone No)","作业前检测(Pre-Job Check)", "检测人(Checked By)", "最高温度(Max. T(℃))", "最高压力(Max. P(psi))", "流体类别(Fluid Type)", "使用日期(Date)","开始时间(Start Time)", "结束时间(End Time)","工作周期(Working Time)","状态(Status)","使用者(User)","备注(Remark)"], //表头标题别名
		colModel: [			
			{name: 'record_id', index: 'record_id', width: 70,fixed:true,searchoptions:{sopt: ['eq']}},			
			{name: 'well_name', index: 'well_name', width: 180,fixed:true, align: 'left', sortable:false, editable:false},
			{name: 'zone_no', index: 'zone_no', width: 180,fixed:true, align: 'left', sortable:false, editable:false},
			{name: 'pre-job_check', index: 'pre-job_check', width: 180, sortable:false, editable:false},
			{name: 'checked_by', index: 'checked_by', width: 180, sortable:false, editable:false},
			{name: 'max_t', index: 'max_t', width: 180, sortable:false, editable:false},
			{name: 'max_p', index: 'max_p', width: 180, sortable:false, editable:false},
			{name: 'fluid_type', index: 'fluid_type', width: 180, align: 'left', sortable:false, editable:false},
			{name: 'date', index: 'date', width: 140, align: 'left',search:false, sortable:false,editable:false},
			{name: 'start_time', index: 'start_time', width: 140, sortable:false, editable:false},
			{name: 'end_time', index: 'end_time', width: 140, sortable:false, editable:false},
			{name: 'working_time', index: 'working_time', width: 140, sortable:false, editable:false},
			{name: 'state', index: 'state', width: 100, sortable:false, editable:false},
			{name: 'user', index: 'user', width: 100, sortable:false, editable:false},
			{name: 'info', index: 'info', width: 180, sortable:false, editable:false}			
		],
		// JSON
		jsonReader: { 
			root: "list_data", 
			page: "page", 
			total: "total", 
			records: "records",
			repeatitems: false
		},
		//width: 600,
		height:350,//整个显示的最大高度
		autowidth:true,
		shrinkToFit:false, //水平滚动条
		pager: $('#pager_gur'),
		//pgbuttons: true,
		rowNum: 15, //每页显示记录数
		rowList:[15,20,30], //可调整每页显示的记录数
		sortname: 'record_id',
		rownumbers: true, //自动行号
		//sortorder: "desc",
		viewrecords: true //是否显示行数
	});
	
	$("#list_gur").navGrid("#pager_gur", {
			refresh: true,
			edit: false,
			add: false,
			del:false,
			search: false,
			position: "left"
		}
	);
});